﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>


    <fieldset>
        <legend>公告</legend>

        <table width="100%">
            <tr>
                <td style="text-align: center"><h2 id="title">标题</h2></td>
            </tr>

            <tr>
                <td style="text-align: right;">发布人：<span id="creator"></span> &nbsp;&nbsp; 发布时间：<span id="crateTime"></span></td>
            </tr>

            <tr>
                <td id="content">
             
                </td>
            </tr>
            
        </table>
     
    </fieldset>
    
    <script src="/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <script>
        layui.use(['form'], function () {
            var form = layui.form,
                layer = layui.layer,
                $ = layui.$;


            var id = window.location.search.substring(4);


            //为了获取通知之前的数据，展示到表单里
            $.ajax({
                url: '/Notice/GetNoticeById',
                type: 'get',
                data: {
                    id: id
                },
                success: function (res) {
                    $('#content').html(res.data.content.replaceAll('\n','<br />'));
                    $('#title').text(res.data.title);
                    $('#creator').text(res.data.creator);
                    $('#crateTime').text(res.data.createTime);
                }
            });

          

        });
    </script>
    
</body>
</html>